<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Home extends CI_Controller {

	/**http://ipinfo.io/
	 * Index Page for this controller.
	 *
	 * Maps to the following URL
	 * 		http://example.com/index.php/welcome
	 *	- or -  
	 * 		http://example.com/index.php/welcome/index
	 *	- or -
	 * Since this controller is set as the default controller in 
	 * config/routes.php, it's displayed at http://example.com/
	 *
	 * So any other public methods not prefixed with an underscore will
	 * map to /index.php/welcome/<method_name>
	 * @see http://codeigniter.com/user_guide/general/urls.html
	 */
	public function index()
	{
		  //$this->load->library('template');          
  /* get country by ip 
$result = file_get_contents("http://api.hostip.info/get_json.php?ip=24.48.176.0");
$result = json_decode($result, 1); 
echo $result['country_code']; */

         
         $data = $this->template->render(array()); 
         $data ['slideshow']  = $this->load->controller('mod_slideshow',array(),true);       
         $this->load->view('default/home',$data);
         //$data['dd']= $this->load->view('test','',true);
         //$this->load->view('welcome_message',$data);
	}
    function hethong(){
        //$text_serialize = serialize($data); 
        //$text_serialize = unserialize($data); 
     file_put_contents('viewdaugia.txt', $view);
     file_get_contents('viewdaugia.txt'); 
     
     //   
    }
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */